<?php
function region_exists($slug){
    return region::newInstance()->findBySlug($slug);
}

function city_exists($slug){
    
    return city::newInstance()->findBySlug($slug);
}

function city_area_exists($slug){
    return cityArea::newInstance()->findBySlug($slug);
}

function location_exists($slug){
    if(region_exists($slug)||city_exists($slug)||city_area_exists($slug)){
        return TRUE;
    }else{
        return FALSE;
    }
}

